package com.seeyon.ctp.rest.resources;

import java.util.HashMap;
import java.util.Map;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.seeyon.apps.kk.manager.restImpl.AttendanceDataImpl;
import com.seeyon.ctp.common.AppContext;

/**
 * 
 * @author 考勤接口NC提供
 *
 */
@Path("/kk/attendance")
public class AttendanceData extends BaseResource{
	private static final Log log = LogFactory.getLog(AttendanceData.class);
	
	private AttendanceDataImpl dataImpl;
	
	@GET
	@Path("/annual")
	@Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_HTML })
	@Consumes({ MediaType.APPLICATION_JSON, MediaType.TEXT_HTML })
	public Response getAnnualData(){
		Map<String, Object> rsMap = new HashMap<String, Object>();
		rsMap.put("code", "0001");
		// getInit().getAnnualData();
		rsMap.put("data", "接口已更新，请联系管理员！");
		return ok(rsMap);
	}
	
	private AttendanceDataImpl getInit(){
		if(dataImpl == null)
			dataImpl = (AttendanceDataImpl) AppContext.getBean("attendanceDataImpl");
		return dataImpl;
	}
}
